<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=0" /> 
        <link href="{$theme_path}/css/basic.css"  rel="stylesheet">
        <script src="{$theme_path}/js/jquery-2.1.4.min.js"></script> 
        
    </head>
    <body>
        <div class="editor" id="editor">
            {$detail|htmlspecialchars_decode}
        </div>
<script>
            function resizeImg() {
                
                var resizeContentID = "editor";
                var images = document.getElementById(resizeContentID).getElementsByTagName("img");
                for (var i = 0; i < images.length; i++) {
                    resizepic(images[i]);
                }
            }
            
            function resizepic(thispic)
            {
                var maxWidth = $("#editor").width();
                thispic.onload = function() {
                    if (thispic.width > maxWidth) {
                        thispic.style.height = thispic.height * maxWidth / thispic.width + "px";
                        thispic.style.width = maxWidth + "px";  
                    }  
                }
            }
           
        </script>
        
    </body>
</html>